<?php
/**
 * Created by PhpStorm.
 * User: changshuiwang
 * Date: 2016/7/8
 * Time: 15:12
 */

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use backend\assets\AppAsset;
use backend\config\ScoreDef;
use backend\config\StudentDef;

//$this->title = 'Add';
//$this->params['breadcrumbs'][] = $this->title;

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <link href="/assets/c1fad91c/css/bootstrap.css" rel="stylesheet">
    <link href="/css/site.css" rel="stylesheet">
    <link rel="stylesheet" href="/css/bootstrap.min.css" />
    <link rel="stylesheet" href="/css/bootstrap-responsive.min.css" />
    <link rel="stylesheet" href="/css/fullcalendar.css" />
    <link rel="stylesheet" href="/css/matrix-style.css" />
    <link rel="stylesheet" href="/css/matrix-media.css" />
    <link rel="stylesheet" href="/css/font-awesome/css/font-awesome.css" />
    <link rel="stylesheet" href="/css/jquery.gritter.css" />
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,800' rel='stylesheet' type='text/css'>
    <script src="/js/upload.js"></script>
    <script src="/js/upload_img.js"></script>
    <script src="/js/site/add.js"></script>
    <style>
        #content{
            margin-left: 0px;
            padding:0px;
            height:760px;
        }
        #content input[type='text']{
            width:60%;
        }
    </style>
</head>
<body>
<div id="content">
    <div id="content-header">
        <div id="breadcrumb"> <a href="/site/index" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> Home</a>
            <a href="#" class="tip-bottom">add</a></div>
        <h1><?= Html::encode($this->title) ?></h1>
    </div>
    <div class="widget-box">
        <div class="widget-title"> <span class="icon"> <i class="icon-th"></i> </span>
            <h5>学生详情</h5>
            <a href="/site/update?id=<?=$stu_info->id?>" target="_top"
               class="btn btn-primary btn-mini label label-info">编辑</a>
        </div>
        <div class="widget-content nopadding">
            <table class="table table-bordered table-striped">
<!--                <thead>
                <tr>
                    <th>#</th>
                    <th>Name</th>
                    <th>Last Name</th>
                    <th>Username</th>
                </tr>
                </thead>-->
                <tbody>
                <?php
                    foreach ($stu_info as $k=>$v){
                        if($k=='photo') {
                            ?>
                            <tr>
                                <td><?= $k ?></td>
                                <td>
                                    <span style="width:350px;height:220px;overflow: hidden">
                                        <img src="/<?= $v ?>" />
                                    </span>
                                </td>
                            </tr>
                <?php
                        }elseif($k=='tag'){
                ?>
                            <tr>
                                <td><?= $k ?></td>
                                <td><?= StudentDef::$status_arr[$v] ?></td>
                            </tr>
                <?php
                        }else{

                ?>
                            <tr>
                                <td><?= $k ?></td>
                                <td><?= $v ?></td>
                            </tr>
                <?php
                        }
                    }
                ?>
                <?php
                    foreach ($scores as $k){
                ?>
                        <tr>
                            <td><?=ScoreDef::$type_arr[$k->type]?></td>
                            <td><?=$k->score?></td>
                        </tr>
                <?php
                    }
                ?>
                </tbody>
            </table>
        </div>
    </div>
</div>
</body>
